﻿/*******************************************************************************************************************************************
Modification History:
********************************************************************************************************************************************
Date		Author		    Description
********************************************************************************************************************************************
05/07/2011	Brian Kuhn	    Created IMessageContext interface
*******************************************************************************************************************************************/
using System;
using System.Xml;

namespace Concise
{
    /// <summary>
    /// Describes the context information for a message.
    /// </summary>
    public interface IMessageContext
    {
        //=======================================================================================================
        //  Properties
        //=======================================================================================================
        #region MessageId
        /// <summary>
        /// Gets or sets the unique identifier for the message.
        /// </summary>
        /// <value>
        /// A <see cref="UniqueId"/> that identifies the the message.
        /// </value>
        /// <exception cref="ArgumentNullException">The <paramref name="value"/> is a <see langword="null"/> reference (Nothing in Visual Basic).</exception>
        UniqueId MessageId
        {
            get;
            set;
        }
        #endregion

        #region MessageType
        /// <summary>
        /// Gets or sets the assembly-qualified name of the <see cref="Type"/> for the message.
        /// </summary>
        /// <value>
        /// The assembly-qualified name of the <see cref="Type"/> for the message, which includes the name of the assembly from which the message <see cref="Type"/> was loaded.
        /// </value>
        /// <exception cref="ArgumentNullException">The <paramref name="value"/> is a <see langword="null"/> or <see cref="String.Empty"/> string.</exception>
        string MessageType
        {
            get;
            set;
        }
        #endregion

        #region SentBy
        /// <summary>
        /// Gets or sets the unique identifier of the service bus node that sent the message.
        /// </summary>
        /// <value>
        /// A <see cref="UniqueId"/> that identifies the service bus node that sent the message.
        /// </value>
        /// <exception cref="ArgumentNullException">The <paramref name="value"/> is a <see langword="null"/> reference (Nothing in Visual Basic).</exception>
        UniqueId SentBy
        {
            get;
            set;
        }
        #endregion

        #region SendTo
        /// <summary>
        /// Gets or sets the unique identifier of the service bus node that is the intended target of the message.
        /// </summary>
        /// <value>
        /// A <see cref="UniqueId"/> that identifies the service bus node that is the intended target of the message.
        /// </value>
        /// <remarks>
        /// <see cref="SendTo"/> will be a <see langword="null"/> reference when a message is <see cref="IServiceBus.Publish">published</see> 
        /// to subscribing message bus nodes and populated when a message is <see cref="IServiceBus.Send">sent</see> to a specific message bus node.
        /// </remarks>
        /// <exception cref="ArgumentNullException">The <paramref name="value"/> is a <see langword="null"/> reference (Nothing in Visual Basic).</exception>
        UniqueId SendTo
        {
            get;
            set;
        }
        #endregion
    }
}
